package com.cashmama.market.api.application.controller.order.request;


import com.cashmama.market.api.infras.exception.ApplicationException;
import com.fqgj.common.api.ParamsObject;
import com.fqgj.common.utils.CollectionUtils;

import java.util.List;

/**
 * @program: market-api
 * @description 还款渠道
 * @author: frank
 * @create: 2019-12-25 21:13
 **/
public class RepayChannelRequest extends ParamsObject {

    private List<String> pendingBillNos;
    private Integer type;

    public Integer getType() {
        return type;
    }

    public RepayChannelRequest setType(Integer type) {
        this.type = type;
        return this;
    }

    public List<String> getPendingBillNos() {
        return pendingBillNos;
    }

    public RepayChannelRequest setPendingBillNos(List<String> pendingBillNos) {
        this.pendingBillNos = pendingBillNos;
        return this;
    }

    @Override
    public void validate() {
        if(CollectionUtils.isEmpty(pendingBillNos)){
            throw new ApplicationException("pendingBillNos can not be empty");
        }
    }
}
